<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%@ include file="../include/include.jsp"%>
<title>【${city}二手车_${city}二手车市场_${city}二手车交易市场】_麦麦车二手车网络超市</title>
<meta name="description" content="麦麦车二手车，认证二手车，透明一口价。融合线下二手车交易市场及明码标价网络超市模式，致力于打造最专业的二手车交易网！二手车鉴定，运用估价模型进行免费二手车评估、估价、报价，二手车收购和销售，提供二手车交易、过户、贷款、上牌、年检等一条龙服务，为${city}用户提供质量认证最优、价格最低的高性价比二手车！" />
<meta name="Keywords" content="${city}二手车网,${city}二手车报价,${city}二手车市场,${city}二手车交易，${city}二手车评估" />
<link rel="stylesheet" type="text/css" href="${cssPath}/resources/css/index.css">
</head>
<body>
	<%@ include file="../include/head.jsp"%>
	<!--#cnt 中间的内容-->
	<div id="cnt">
		<div class="cnt-wrap">
			<div class="left-cnt f-fl">
				<!--filter-wrap 条件筛选-->
				<div class="filter-wrap">
					<div class="fm-wrap">
						<form name="filter-fm" class="filter-fm">
							<span class="fm-label f-fl">车&nbsp;&nbsp;型：</span>
							<select class="fm-select f-fl" id="brand">
								<option value="">请选择品牌</option>
								<c:forEach var="brand" items="${brands}">
									<option value="${brand.enname}" ${brand.hidden?"disabled":""}>${brand.firstLetter} ${brand.name}</option>
								</c:forEach>
							</select>
							<select class="fm-select f-fl" disabled="disabled" id="series"><!--品牌的下拉菜单选项被选中时，移除这里的disabled="disabled"-->
								<option value="">请选择系列</option>
							</select>
							<input type="button" id="filter-submit" value="找二手车" class="mmche-btn filter-submit f-fl" />
							<div class="f-clear"></div>
						</form>
						<div class="hot">
							<span class="fm-label f-fl">热&nbsp;&nbsp;门：</span>
							<c:forEach var="brand" items="${hotBrands}" varStatus="status">
								<a class="${status.index>11?'hide':''}" href="${contextPath}/${brand.enname}">${brand.name}</a>
							</c:forEach>
							<div class="f-clear"></div>
						</div>
						<div class="f-clear"></div>
					</div>
					<div class="filter-list-wrap">
						<div class="filter-list filter-border">
							<span class="fm-label f-fl">价&nbsp;&nbsp;格：</span>
							<a href="${contextPath}/H1">3万以下</a></li>
							<a href="${contextPath}/H2">3-5万</a>
							<a href="${contextPath}/H3">5-8万</a>
							<a href="${contextPath}/H4">8-10万</a>
							<a href="${contextPath}/H5">10-15万</a>
							<a href="${contextPath}/H6">15-20万</a>
							<a href="${contextPath}/H7">20-50万</a>
							<a href="${contextPath}/H8">50万以上</a>
							<div class="f-clear"></div>
						</div>
						<div class="filter-list filter-border">
							<span class="fm-label f-fl">车&nbsp;&nbsp;龄：</span>
							<a href="${contextPath}/A1">1年以内</a>
							<a href="${contextPath}/A2">2年以内</a>
							<a href="${contextPath}/A3">3年以内</a>
							<a href="${contextPath}/A4">3-5年</a>
							<a href="${contextPath}/A5">5-8年</a>
							<a href="${contextPath}/A6">8年以上</a>
							<div class="f-clear"></div>
						</div>
						<div class="filter-list">
							<span class="fm-label f-fl">类&nbsp;&nbsp;型：</span>
							<c:set var="i" value="0"/>
							<c:forEach var="dic" items="${carTypes}">
							<c:set var="i" value="${i+1}"/>
								<a href="${contextPath}/T${i}">${dic.desc}</a>
							</c:forEach>
							<div class="f-clear"></div>
						</div>
					</div>
				</div>
				<!--filter-wrap end-->
				<!--sael-wrap 限时特卖-->
				<script>var promoCars = ${fn:length(promoCars)};</script>
				<c:if test="${not empty promoCars}">
				<div class="sael-wrap">
					<div class="hd">
						<h1 class="hd-title f-fl">限时特卖</h1>
						<ul class="f-fr carousel"><!--轮播图标-->
						<c:forEach var="i" begin="0" step="1" end="${(fn:length(promoCars)+2)/3-1}">
							<li class="carousel-icon mmche-icon ${i==0?'crt-carousel':''}" index="${i}"></li><!--选中项添加crt-carousel-->
						</c:forEach>
						</ul>
						<div class="f-clear"></div>
					</div>
					<div class="sael-product">
						<ul class="sael-pro-wrap" style="width:${247*fn:length(promoCars)}px"><!--显示第二个轮播内容时，添加style="left:-741px;显示第三个轮播时，添加style="left:-1481px;"-->
							<c:forEach var="promoCar" items="${promoCars}">
							<li>
								<div class="allowance">
									限时补贴<span class="allowance-sum">3000</span>元
								</div>
								<div class="sael-pro">
									<div class="time-icon mmche-icon" timeout="${promoCar.promoTimeOut}">
									</div>
									<div class="pro-img-wrap v-h-center">
										<a href="${contextPath}/car/${promoCar.id}.html">							
											<img src="${promoCar.imgPath}/${promoCar.indexMainPicName}" title="${promoCar.online.title}" alt="${promoCar.online.title}" class="pro-img" width="200px" height="160px"/>
										</a>					
									</div>
									<div class="pro-info">
										<div class="pro-name">
											<a href="${contextPath}/car/${promoCar.id}.html">${promoCar.online.title}</a>
										</div>
										<div class="pro-price">
											<fmt:formatNumber var="price" value="${(promoCar.online.price)/10000}" pattern="#.0#"/> 
											<span class="price">￥${price}</span><span>万</span>
										</div>
										<div class="pro-buy">
											<fmt:formatNumber var="oldPrice" value="${(promoCar.online.price+3000)/10000}" pattern="#.0#"/> 
											<span class="f-fl original-price">门店价：<span class="line-through">￥${oldPrice}万</span></span>
											<a href="${contextPath}/car/${promoCar.id}.html" class="mmche-btn sael-btn f-fr">
												去购买
											</a>
											<div class="f-clear"></div>
										</div>
									</div>
									<div class="f-clear"></div>
								</div>
							</li>
							</c:forEach>
						</ul>
					</div>
				</div>
				</c:if>
				<!--sael-wrap end-->
				<!--hot-wrap 热卖车型-->
				<div class="hot-wrap">
					<div class="hd">
						<h1 class="hd-title f-fl">热卖车型</h1>
						<ul class="f-fl tab"><!--轮播图标-->
							<li class="crt-tab" href="#lowPriceCars"><h2>经济车型</h2></li><!--选中项添加crt-tab-->
							<li href="#suvCars"><h2>城市SUV</h2></li>
							<li href="#newCars"><h2>准新车</h2></li>
						</ul>
						<a href="${contextPath}/buycar/" class="f-fr more">更多车源>></a>
						<div class="f-clear"></div>
					</div>
					<ul class="hot-pro-wrap" id="lowPriceCars">
						<c:forEach var="lowPriceCar" items="${lowPriceCars}">
						<li class="hot-pro">
							<div class="hot-pro-img v-h-center">
								<a href="${contextPath}/car/${lowPriceCar.id}.html">
									<img src="${lowPriceCar.imgPath}/${lowPriceCar.indexMainPicName}" title="${lowPriceCar.online.title}" alt="${lowPriceCar.online.title}" class="pro-img" width="200px" height="160px" />
								</a>
							</div>
							<div class="pro-info">
								<div class="pro-name">
									<a href="${contextPath}/car/${lowPriceCar.id}.html">
										${lowPriceCar.online.title}
									</a>
								</div>
								<ul class="detail-info">
									<li>
										<span class="label">首次上牌：</span><span>${lowPriceCar.registerMonth}</span>
									</li>
									<li>
										<span class="label">里程：</span><span>${lowPriceCar.mileage}万公里</span>
									</li>
									<li>
									<span class="label">新车价：</span><span>${lowPriceCar.newCarPrice}</span><span class="label">（含置购税）</span>
									</li>
								</ul>
								<div>
									麦麦车一口价：<span class="price-sum">￥${lowPriceCar.price}</span>
								</div>
							</div>
						</li>
						</c:forEach>
					</ul>
					<ul class="hot-pro-wrap hide" id="suvCars">
						<c:forEach var="suvCar" items="${suvCars}">
						<li class="hot-pro">
							<div class="hot-pro-img v-h-center">
								<a href="${contextPath}/car/${suvCar.id}.html">
									<img src="${suvCar.imgPath}/${suvCar.indexMainPicName}" title="${suvCar.online.title}" alt="${suvCar.online.title}" class="pro-img" width="200px" height="160px" />
								</a>
							</div>
							<div class="pro-info">
								<div class="pro-name">
									<a href="${contextPath}/car/${suvCar.id}.html">
										${suvCar.online.title}
									</a>
								</div>
								<ul class="detail-info">
									<li>
										<span class="label">首次上牌：</span><span>${suvCar.registerMonth}</span>
									</li>
									<li>
										<span class="label">里程：</span><span>${suvCar.mileage}万公里</span>
									</li>
									<li>
									<span class="label">新车价：</span><span>${suvCar.newCarPrice}</span><span class="label">（含置购税）</span>
									</li>
								</ul>
								<div>
									麦麦车一口价：<span class="price-sum">￥${suvCar.price}</span>
								</div>
							</div>
						</li>
						</c:forEach>
					</ul>
					<ul class="hot-pro-wrap hide" id="newCars">
						<c:forEach var="newCar" items="${newCars}">
						<li class="hot-pro">
							<div class="hot-pro-img v-h-center">
								<a href="${contextPath}/car/${newCar.id}.html">
									<img src="${newCar.imgPath}/${newCar.indexMainPicName}" title="${newCar.online.title}" alt="${newCar.online.title}" class="pro-img" width="200px" height="160px" />
								</a>
							</div>
							<div class="pro-info">
								<div class="pro-name">
									<a href="${contextPath}/car/${newCar.id}.html">
										${newCar.online.title}
									</a>
								</div>
								<ul class="detail-info">
									<li>
										<span class="label">首次上牌：</span><span>${newCar.registerMonth}</span>
									</li>
									<li>
										<span class="label">里程：</span><span>${newCar.mileage}万公里</span>
									</li>
									<li>
									<span class="label">新车价：</span><span>${newCar.newCarPrice}</span><span class="label">（含置购税）</span>
									</li>
								</ul>
								<div>
									麦麦车一口价：<span class="price-sum">￥${newCar.price}</span>
								</div>
							</div>
						</li>
						</c:forEach>
					</ul>
				</div>
				<!--hot-wrap end-->
			</div>
			<div class="right-cnt f-fr">
				<!--security-wrap 保障体系 -->
				<div class="cnt-wrap security-wrap">
					<div class="right-hd mmche-bg">
						麦麦车保障体系
					</div>
					<ul class="security-list">
						<li>
							<div class="mmche-icon security-tui"></div>
							<div class="security-info">七天退款</div>
						</li>
						<li>
							<div class="mmche-icon security-jia"></div>
							<div class="security-info">一口价</div>
						</li>
						<li>
							<div class="mmche-icon security-zheng"></div>
							<div class="security-info">三大保证</div>
						</li>
					</ul>
				</div>
				<!--security-wrap end-->
				<!--ad-wrap 广告-->
				<a href="${contextPath}/pinggu.html" class="ad-wrap f-b">
					<img src="${contextPath}/resources/images/ad-img.png" title="估价宝" alt="估价宝" width="246px" height="80px" />
				</a>
				<!--ad-wrap end-->
				<!--line-wrap 二手车在线评估-->
				<div class="cnt-wrap line-wrap">
					<div class="right-hd mmche-bg">
						二手车在线评估
					</div>
					<form name="line-fm">
						<ul class="line-fm">
							<li>
								<span class="fm-label f-fl">品牌：</span>
								<select class="fm-select f-fl" id="evaluateBrand">
									<option value="">请选择品牌</option>
								</select>
								<div class="f-clear"></div>
							</li>
							<li>
								<span class="fm-label f-fl">车系：</span>
								<select class="fm-select f-fl" id="evaluateSeries">
									<option value="">请选择车系</option>
								</select>
								<div class="f-clear"></div>
							</li>
							<li>
								<span class="fm-label f-fl">排量：</span>
								<select class="fm-select f-fl" id="evaluateDisplacement">
									<option value="">请选择排量</option>
								</select>
								<div class="f-clear"></div>
							</li>
							<li>
								<span class="fm-label f-fl">上牌：</span>
								<select class="fm-select f-fl fm-select-s">
									<option value="">选择</option>
									<c:forEach var="year" items="${yearList}">
										<option value="${year}">${year}</option>
									</c:forEach>
								</select>
								<span class="f-fl">年</span>
								<select class="fm-select f-fl fm-select-s2">
									<option value="">选择</option>
									<c:forEach var="month" begin="1" end="12" step="1">
					                	<fmt:formatNumber var="month" value="${month}" pattern="00"/> 
					                	<option value="${month}">${month}</option>
					                </c:forEach>
								</select>
								<span class="f-fl">月</span>
								<div class="f-clear"></div>
							</li>
							<li>
								<span class="fm-label">变速箱：</span>
								<input type="radio" class="fm-radio" value="">
								<span class="fm-label2">自动挡</span>
								<input type="radio" class=" fm-radio" value="">
								<span>手动挡</span>
							</li>
							<li>
								<span class="fm-label f-fl">里程：</span>
								<input type="text" class="fm-text f-fl" value="" /><span>万公里</span>
								<div class="f-clear"></div>
							</li>
						</ul>
						<input type="submit" value="开始评估" class="fm-submit mmche-btn" />
						<div class="f-clear"></div>
					</form>
				</div>
				<!--line-wrap end-->
				<c:if test="${not empty guides}">
				<!-- article-wrap 二手车攻略-->
				<div class="cnt-wrap article-wrap">
					<div class="right-hd mmche-bg">
						<span class="f-fl">二手车攻略</span>
						<a href="#" class="more f-fr">更多>></a>
						<div class="f-clear"></div>
					</div>
					<ul class="article-list">
						<c:forEach var="content" items="${guides}" varStatus="status">
						<li>
							<span class="f-fl list-no ${status.index<3?'orange-bg':''}">${status.index+1}</span><a href="#" class="f-fl text-ellipsis" title="${content.title}">${content.title}</a>
						</li>
						</c:forEach>
					</ul>
				</div>
				<!--article-wrap end-->
				</c:if>
				<c:if test="${not empty news}">
				<!-- article-wrap 二手车资讯-->
				<div class="cnt-wrap article-wrap">
					<div class="right-hd mmche-bg">
						<span class="f-fl">二手车资讯</span>
						<a href="#" class="more f-fr">更多>></a>
						<div class="f-clear"></div>
					</div>
					<ul class="article-list">
						<c:forEach var="content" items="${news}" varStatus="status">
						<li>
							<span class="f-fl list-no ${status.index<3?'orange-bg':''}">${status.index+1}</span><a href="#" class="f-fl text-ellipsis" title="${content.title}">${content.title}</a>
						</li>
						</c:forEach>
					</ul>
				</div>
				</c:if>
				<!--article-wrap end-->
				<c:if test="${not empty saledCars}">
				<!--comment-wrap 二手车评价-->
				<div class="cnt-wrap article-wrap comment-wrap">
					<div class="right-hd mmche-bg">
						<span class="f-fl">二手车评价</span>
						<a href="${contextPath}/comment/all" class="more f-fr">更多>></a>
						<div class="f-clear"></div>
					</div>
					<ul class="comment-list">
						<c:forEach var="saledCar" items="${saledCars}">
						<li>
							<a href="#" class="comment-hd text-ellipsis"  title="${saledCar.online.title}">
								${saledCar.online.title}
							</a>
							<p class="comment-cnt">
								客户评价：${saledCar.comment.feeling }
							</p>
						</li>
						</c:forEach>
					</ul>
				</div>
				<!--comment-wrap end-->
				</c:if>
			</div>
			<div class="f-clear"></div>
			<!--coo-wrap 合作伙伴-->
			<div class="coo-wrap">
				<div class="hd">
					<h1 class="hd-title f-fl">合作伙伴</h1>
					<ul class="f-fl tab"><!--轮播图标-->
						<li class="crt-tab" href="#coo"><h2>合作伙伴</h2></li><!--选中项添加crt-tab-->
						<li href="#friend-links"><h2>友情链接</h2></li>
					</ul>
					<div class="f-clear"></div>
				</div>
				<div class="coo-bg" id="coo">
					<span href="#" class="pre-negative mmche-icon f-ib"></span><!--不可点击状态：pre-negative；可点击状态：pre-positive-->
					<div class="coo-list-wrap">
						<ul class="coo-list">
							<li>
								<img src="${contextPath}/resources/images/mobil.png" title="美孚" alt="美孚" height="41px" width="128px" />
							</li>
							<li>
								<img src="${contextPath}/resources/images/miqilin.png" title="米其林轮胎" alt="米其林轮胎" height="41px" width="124px" />
							</li>
							<li>
								<img src="${contextPath}/resources/images/bosch.png" title="博世" alt="博世"  height="41px" width="116px"/>
							</li>
							<li>
								<img src="${contextPath}/resources/images/3m.png" title="三脉" alt="三脉" height="41px" width="79px" />
							</li>
							<li>
								<img src="${contextPath}/resources/images/audi.png" title="奥迪" alt="奥迪" height="41px" width="48px" />
							</li>
							<li>
								<img src="${contextPath}/resources/images/biaozhi.png" title="标志" alt="标志" height="41px" width="41px"/>
							</li>
							<li>
								<img src="${contextPath}/resources/images/baidu.png" title=""百度"" alt="百度" height="41px" width="100px"/>
							</li>
						</ul>
					</div>
					<span href="#" class="next-negative mmche-icon f-ib"></span><!--不可点击状态：next-negative；可点击状态：next-positive-->
				</div>
				<!-- 友情链接 -->
				<ul class="friend-links" id="friend-links">
					<c:forEach var="link" items="${links}">
						<li><a href="${link.url}" target="_blank" title="${link.name}">${link.name}</a></li>
					</c:forEach>
					<li><a href="${contextPath}/links.html" title="更多友情链接">更多...</a></li>
				</ul>
				<!-- 友情链接 end -->
			</div>
			<!--coo-wrap end-->
		</div>
	</div>
	<!--#cnt end-->
	<%@ include file="../include/foot.jsp"%>
	<script type="text/javascript" src="${jsPath}/resources/js/index.js"></script>
	<script>
	$(document).ready(function(){
 		var currentTime = ${currentTime};
 		setInterval(function(){
 			$(".time-icon").each(function(){
 				var timeout = $(this).attr("timeout");
	     		var spanSeconds =  timeout-currentTime;
	     		$(this).attr("timeout",timeout-100);
    			if(spanSeconds<=0){
    				$(this).closest('li').hide();
    			}
    			else{
    				$(this).html(calCountDown(spanSeconds));
    			}
 			});
		},100);
     	function calCountDown(spanSeconds){
     		//var d = Math.floor((spanSeconds / (24*60*60*1000)));
    		//var h = Math.floor((spanSeconds % (24*60*60*1000) / (60*60*1000)));
    		var h = Math.floor((spanSeconds / (60*60*1000)));
    		var m = Math.floor((spanSeconds % (60*60*1000) / (60*1000)));
    		var s = (Math.round(spanSeconds % (60*1000) / 1000 * 10)/10.0).toFixed(1);
    		/* if(d>0)
    			return ['剩余<span class="time">',d,'</span>天<span class="time">',h,'</span>小时<span class="time">',m,'</span>分<span class="time">',s,'</span>秒'].join("");
    		else  */
    		if(h>0)
    			return ['剩余<span class="time">',h,'</span>小时<span class="time">',m,'</span>分<span class="time">',s,'</span>秒'].join("");
    		else if(m>0)
    			return ['剩余<span class="time">',m,'</span>分<span class="time">',s,'</span>秒'].join("");
    		else
    			return ['剩余<span class="span">',s,'</span>秒'].join("");
    	}
	});
	</script>
</body>
</html>